package com.chen.springcloud.service.impl;

import com.chen.springcloud.dao.DeptDao;
import com.chen.springcloud.service.DeptService;
import com.chen.springcloud.entity.Dept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName
 * @Description:
 * @Author:
 * @Date: Created in 16:24 2022/5/22
 */
@Service
public class DeptServiceImpl implements DeptService {

    @Autowired
    private DeptDao deptDao;

    /**
     *  保存部门信息
     * @param dept
     * @return
     */
    @Override
    public Boolean saveDeptInfo(Dept dept) {
        return deptDao.saveDeptInfo(dept);
    }

    /**
     *  通过部门id 查询部门信息
     * @param deptno
     * @return
     */
    @Override
    public Dept queryDeptById(Integer deptno) {
        return deptDao.queryDeptById(deptno);
    }

    /**
     *  查询所有部门信息
     * @param
     * @return
     */
    @Override
    public List<Dept> queryDeptAll() {
        return deptDao.queryDeptAll();
    }
}
